import request from '../utils/request'
import { HttpMethod } from '../utils/http'


export default {
  // 获取新品
  getNewProducts () {
    return request({
      url: '/beauty/product/getNewProducts',
      method: HttpMethod.GET
    })
  },
  // 获取推荐商品
  gerRecommendProducts () {
    return request({
      url: '/beauty/product/gerRecommendProducts',
      method: HttpMethod.GET
    })
  },
  // 搜索
  search (data) {
    return request({
      url: '/beauty/product/search',
      method: HttpMethod.POST,
      data
    })
  },
  // 详情
  detail (productId) {
    return request({
      url: `/beauty/product/detail`,
      method: HttpMethod.GET,
      params: {
        productId
      }
    })
  }
}
